﻿@model GameSchool.Models.IsInCourse

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Content/css/forms.css" />
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Setja notanda í áfanga</legend>

        <div class="editor-label">
            <h2>Notandi:</h2>
        </div>
        <div class="editor-field" id="userselector">
            @Html.DropDownList("UserID")
            @Html.ValidationMessageFor(model => model.UserID)
        </div>

         <div class="editor-label">
            <h2>Áfangi:</h2>
        </div>
        <div class="editor-field" id="courseselector">
            @Html.DropDownList("CourseID")
            @Html.ValidationMessageFor(model => model.CourseID)
        </div>

         <div class="editor-label">
            <h2>Kennararéttindi:</h2>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsTeacher)
            @Html.ValidationMessageFor(model => model.IsTeacher)
        </div>
         
        <section class="buttonfield"> 
            <section class="one-third last">
                <input type="submit" value="Vista" class="sendbutton" name="sendbutton" /> 
             </section>               
             <section class="one-third">       
                 <a href="@Url.Action("Index","Home")"><button class="backbutton">Til baka</button></a>
             </section>
         </section>
         
     </fieldset>
    <section class="validation-message">
                <p>
                   @Html.ValidationSummary(true, "Ekki tókst að bæta nemanda við í áfanga, vinsamlegast skoðið innslátt og val.")
                </p>
            </section> 
}

